package com.zbkj.dal.entity.fund;

import com.zbkj.dal.base.enums.FundDirectionEnums;
import lombok.Data;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author JinXinyu
 * @date 2024-02-20 21:52:07
 */
@Data
@TableName("eb_user_quota_change_record")
public class UserQuotaChangeRecord implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @TableField("id")
    private Long id;

    /**
     * 额度流水号
     */
    @TableField("quota_no")
    private String quotaNo;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 额度账户id
     */
    @TableField("quota_id")
    private Integer quotaId;

    /**
     * 额度账号
     */
    @TableField("quota_account")
    private String quotaAccount;

    @TableField("biz_order_no")
    private String bizOrderNo;

    /**
     * 变动额度
     */
    @TableField("quota_change_amount")
    private BigDecimal quotaChangeAmount;

    @TableField("image")
    private String image;

    /**
     * 变动方向
     *
     * @see FundDirectionEnums
     */
    @TableField("change_direction")
    private Integer changeDirection;

    /**
     * 变动类型
     *
     * @see com.zbkj.dal.base.enums.QuotaChangeType
     */
    @TableField("change_type")
    private String changeType;

    /**
     * 变动前额度总额
     */
    @TableField("old_quota_total")
    private BigDecimal oldQuotaTotal;

    /**
     * 变动后额度总额
     */
    @TableField("new_quota_total")
    private BigDecimal newQuotaTotal;

    /**
     * 变动前额度可用
     */
    @TableField("old_quota_balance")
    private BigDecimal oldQuotaBalance;

    /**
     * 变动后额度可用
     */
    @TableField("new_quota_balance")
    private BigDecimal newQuotaBalance;

    /**
     * 变动前额度已用
     */
    @TableField("old_quota_used")
    private BigDecimal oldQuotaUsed;

    /**
     * 变动后额度已用
     */
    @TableField("new_quota_used")
    private BigDecimal newQuotaUsed;

    @TableField("status")
    private String status;

    /**
     * 记账时间
     */
    @TableField("bill_date")
    private LocalDate billDate;

    /**
     * 签名
     */
    @TableField("signature")
    private String signature;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 是否删除
     */
    @TableField("is_deleted")
    private Integer deleted;

    @TableField("remark")
    private String remark;
}
